// 内容页
.detail.content {
    img {
        max-width: 100%;
    }

    table {
        table {
            width: 100%;
            margin: 15px 0;
            border: 0;
        }

        th {
            font-weight: bold;
            background-color: #c6f0fe;
            color: #209bfe;
            border: 1px solid #c6f0fe;
            border-width: 1px;
        }

        td {
            border: 1px solid #c6f0fe;
            border-width: 1px;
        }

        tr {
            border: 1px solid #ffffff;

            &:nth-child(odd) {
                background-color: #f7f7f7;
            }

            &:nth-child(even) {
                background-color: #ffffff;
            }
        }
    }

    blockquote {
        padding: 4px;
        margin: 0 0 0 0;
        display: block;
        -webkit-margin-before: 0;
        -webkit-margin-after: 0;
        -webkit-margin-start: 0;
        -webkit-margin-end: 0;
        border-left: solid 2px #209bfe;
    }

    p {
        margin: 0 2px;
    }
}

.content table, table th, table td {
    font-size: 0.95em;
    text-align: center;
    padding: 4px;
    border-collapse: collapse;
}

// 评论
#comments-box {
    ul li {
        margin: 0;
        padding: 0;
    }

    p {
        margin: .5rem 0;
        position: relative;
    }

    text-align: initial;

    h4 {
        font-weight: 500;
        padding-bottom: 1rem;
        margin-bottom: 0;
        border-bottom: 1px #cfcfcf solid;
    }

    ul#comments {
        margin: 0 0 5rem;
        padding: 0;
        list-style: none;

        li.item {
            .comment-item {
                padding: .5rem 0;
                position: relative;

                .meta {
                    img.avatar {
                        float: left;
                        width: 40px;
                        height: 40px;
                        border-radius: 50%;
                    }

                    p {
                        line-height: initial;
                        margin-bottom: .3rem;
                        padding-left: 50px;

                        &.name {
                            color: #3fb1a3;
                            font-weight: 500;
                            font-size: 17px;

                            span {
                                border-radius: 5px;
                                background: #5d7eff;
                                color: white;
                                padding: 3px 6px;
                                font-size: 13px;
                            }
                        }

                        &.date {
                            color: #b4b4b4;
                            font-size: 15px;
                        }
                    }
                }

                .content {
                    word-wrap: break-word;
                    white-space: normal;
                    word-break: break-all;
                    padding-right: 50px;
                    padding-bottom: 10px;
                    border-bottom: 1px #e4dcdc solid;

                    a.at {
                        color: #5276ff;
                        border: 0;
                    }
                }

                a.reply {
                    position: absolute;
                    right: 0;
                    bottom: 15px;
                }
            }

            ul.children {
                list-style: none;
                margin-left: 30px;
            }
        }
    }

    .buttons {
        text-align: center;
    }

    p.close-comment {
        i {
            color: #acacac;
        }

        margin: 1rem 0;
        text-align: center;
    }
}

// 分页样式
ul.pagination {
    list-style: none;
    text-align: center;
    margin: 5rem 0;

    li.page-item {
        padding: 0;
        margin: 0 .1rem;
        display: inline-block;

        &.disabled, &.active {
            cursor: not-allowed;
        }

        &.active {
            .page-link {
                background: #3fb1a3;
                color: white;
            }
        }

        .page-link {
            color: #8f8f8f;
            display: block;
            width: 2rem;
            height: 2rem;
            line-height: 2rem;
            border-radius: 50%;
            background: #ebe5e5;
            border-bottom: 0;
        }
    }
}

// 博客列表
#blogs {
    display: flex;
    flex-wrap: wrap;
    padding: 1em;

    ul {
        width: 100%;
        padding: 0;
        text-align: center;
        margin-bottom: 2rem;

        li {
            display: inline-flex;
            height: 70px;
            padding: 5px;
            width: calc(25% - 5px);

            .item {
                display: flex;
                width: 100%;
                overflow: hidden;
                border-radius: 5px;
                background: transparent;
                border: 0;
                box-shadow: 0 0 20px 0 #eaeaea;
                transition: all .3s;

                &.gray {
                    background: rgba(189, 189, 189, 0.48);
                    opacity: .8;
                }

                &:not(.gray):hover {
                    margin-top: -10px;
                    box-shadow: 0 0 20px 0 #c7c7c7;

                    img {
                        width: 70px;
                    }
                }

                img {
                    display: flex;
                    height: 100%;
                    width: 60px;
                    border-radius: 3px;
                    object-fit: cover;
                    transition: all .3s;
                }

                .meta {
                    text-align: left;
                    display: flex;
                    flex-direction: column;
                    padding-left: 10px;
                    line-height: initial;
                    justify-content: space-around;

                    h4 {
                        padding: 0;
                        margin: 0;
                        font-size: 15px;
                        line-height: initial;
                        color: gray;
                        font-weight: bold;
                        overflow: hidden;
                        text-overflow: ellipsis;
                        display: -webkit-box;
                        -webkit-line-clamp: 1;
                        -webkit-box-orient: vertical;
                    }

                    span {
                        font-size: 14px;
                        color: gray;
                    }
                }
            }
        }

        &.hide {
            position: relative;
            height: 70px;
            overflow: hidden;

            .show-all {
                display: block;
            }
        }
    }

    #show-more, #show-all {
        outline: none;
        border: none;
        color: #868686;
        font-size: 15px;
        width: 100%;
        margin-bottom: 1rem;

        &#show-more {
            margin-bottom: 5rem;

            &[disabled] {
                cursor: not-allowed;
            }
        }

        i {
            font-size: 14px;
        }
    }
}

// 评论
#cancel-reply {
    display: none;
    position: absolute;
    right: 0;
}

#comment-form {
    margin-top: 1rem;
}

// 博客详情页
.adapro {
    display: flex;
}

.cleft {
    width: 50%;
    border-radius: 5px;
    background-color: #f3f6fa;
    text-align: center;
    padding-bottom: 20px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;

    img {
        border-radius: 50%;
        width: 150px;
        margin-top: 40px;
    }

    p {
        text-align: left;
        margin: 30px;
    }

    a {
        border-bottom: none;
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
    }

    .ribbon {
        position: absolute;
        top: 15px;
        right: -45px;
        width: 150px;
        background-color: #dc3545;
        color: white;
        box-shadow: 0 0 3px rgba(0, 0, 0, .3);
        text-shadow: 0 -1px 0 rgba(0, 0, 0, .4);
        text-align: center;
        transform: rotate(45deg);
    }
}

.linkbtn {
    background-color: #8ca8c5;
    color: #fff;
    text-align: center;
}

.subscript {
    color: #fff;
    height: 30px;
    width: 160px;
    position: absolute;
    right: -40px;
    text-align: center;
    line-height: 30px;
    font-family: "黑体";
    background-color: #ee0c16;
    -moz-transform: rotate(45deg);
    -webkit-transform: rotate(45deg);
    -o-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
    padding-left: 30px;
}

.cright {
    padding-left: 15px;
    width: 50%;
    max-height: 500px;
    overflow: auto;

    h2 {
        margin-bottom: .5rem;
    }

    img {
        max-width: 100%;
    }

    p {
        padding-left: 15px;
        margin-bottom: 15px;
        word-wrap: break-word;
    }

    blockquote {
        background-color: #f3f6fa;
        color: #888;
        margin: 0;
        padding: 0;
        border-left: solid 0.5em #8ca8c5;

        p {
            margin: 0 0 5px 0;
        }
    }
}

body#mourning * {
    filter: grayscale(100%);
    -webkit-filter: grayscale(100%);
    -moz-filter: grayscale(100%);
    -ms-filter: grayscale(100%);
    -o-filter: grayscale(100%);
}

// 覆盖 main.css
#banner .inner {
    //border-radius: 30px;
    box-shadow: 0 0 20px 0 rgba(103, 68, 93, 0.3215686274509804);
}

@media only screen and (max-width: 767px) {
    .adapro {
        display: block;
    }

    .cleft, .cright {
        width: 100%;
    }

    .cright {
        margin-top: 20px;
        padding-left: 0;
    }
}

@media screen and (max-width: 1680px) {
    #blogs {
        ul {
            li {
                width: calc(25% - 5px);
            }
        }
    }
}

@media screen and (max-width: 1280px) {
    #blogs {
        ul {
            li {
                span.str {
                    display: none;
                }
            }
        }
    }
}

@media screen and (max-width: 980px) {
    #blogs {
        ul {
            li {
                width: calc(50% - 5px);
            }
        }
    }
}

@media screen and (max-width: 840px) {
    #blogs {
        ul {
            li {
                width: calc(25% - 5px);
            }
        }
    }
}

@media screen and (max-width: 736px) {
    #blogs {
        ul {
            li {
                width: calc(50% - 5px);

                span.str {
                    display: none;
                }
            }
        }
    }
}
